<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            .list {
                color: red;
            }
        </style>
    </head>
    <body>
        <div id="app" v-cloak>
            <ul>
                <li v-for="(m, index) in movies" :class="{list: currentIndex == index}" @click="setColor(index)">{{m}}</li>
            </ul>
        </div>
        <script src="../../js/vue.js"></script>
        <script>
          const app = new Vue({
                el: '#app',
                data: {
                    movies: ['海王', '海尔兄弟', '火影忍者', '进击的巨人'],
                    currentIndex: 0,
                },
                methods: {
                    setColor(index) {
                        this.currentIndex = index;
                    }
                }
            }) 
        </script>
    </body>
</html>